package net.qhzw.admin.controller;

import net.qhzw.admin.param.PersonnelFacinfoParam;
import net.qhzw.admin.query.PersonnelFacinfoQuery;
import net.qhzw.admin.service.PersonnelFacinfoService;
import net.qhzw.common.model.JsonResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;


/****
 *教职信息 前端控制器
 */
@RestController
@RequestMapping("sys/personnelFacinfo")
public class PersonnelFacinfoController {


    @Autowired
    private PersonnelFacinfoService personnelFacinfoService;

    @GetMapping("/{id}")
    public JsonResult getPersonnelFacinfo(@PathVariable(value = "id") String id){
        return personnelFacinfoService.getPersonnelFacinfo(id);
    }

    @PostMapping("list")
    public JsonResult getPersonnelFacinfoList(@RequestBody PersonnelFacinfoQuery query){
        return personnelFacinfoService.getPersonnelFacinfoList(query);
    }


    @PostMapping
    public JsonResult addPersonnelFacinfo(@RequestBody PersonnelFacinfoParam param){
        return personnelFacinfoService.updatePersonnelFacinfo(param);
    }

    @PutMapping
    public JsonResult updatePersonnelFacinfo(@RequestBody PersonnelFacinfoParam param){
        return personnelFacinfoService.updatePersonnelFacinfo(param);
    }


    @DeleteMapping("/{id}")
    public JsonResult deletePersonnelFacinfo(@PathVariable(value = "id") String id){
        return personnelFacinfoService.deletePersonnelFacinfo(id);
    }



}
